import 'package:flutter/material.dart';

class DetialPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: Text('详情页'),
        ),
        body: Container(
          child: Column(children: <Widget>[
            RaisedButton(
              onPressed: () {

                Navigator.pop(context);

              },
              child: Text("直接返回"),
              textColor: Color(0xffff0000),
              color: Color(0xfff1f1f1),
              highlightColor: Color(0xff00ff00),
            ),
            FlatButton (
              onPressed: () {

                Navigator.pop(context, {'name':'flutter','age':5});
              },
              child: Text("返回一串数据：{'name':'flutter','age':5}"),
              disabledTextColor: Color(0xff999999),
              disabledColor: Color(0xffff0000),
              color: Colors.blue,
            ),
            RaisedButton(
              onPressed: () {},
              child: Text("splashColor水波的颜色，disabledColor禁用时背景颜色"),
              splashColor: Color(0xffff0000),
            )
          ]),
        ),
      );
}
